import Vue from 'vue'
import App from './App'
import { request } from '@/service/request.js'

Vue.prototype.$http = request
Vue.config.productionTip = false

Vue.filter('formatDate', (date) => {
	const nDate = new Date(date)
	const year = nDate.getFullYear()
	const month = nDate.getMonth() < 10 ? '0' + nDate.getMonth() : nDate.getMonth()
	const day = nDate.getDay() < 10 ? '0' + nDate.getDay() : nDate.getDay()
	return `${year}-${month}-${day}`
})
App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
